/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXCurrency.h"
#import "OFXObject.h"

@interface OFXAccount : OFXObject {
  NSString* accountId;
  NSString* accountKey;
  NSString* name;
  NSString* accountType;
  OFXCurrency* currency;
  bool supportsTransactionDownload;
  NSString* serviceStatus;
}

/**
 * @property accountId
 * @brief Account number, A-22
 */
@property(retain) NSString* accountId;

/**
 * @property accountKey
 * @brief Checksum, A-22
 *
 * Use of this field by country:
 * - COUNTRY: Interpretation
 *   - BEL: Check digits
 *   - CAN: Not present 
 *   - CHE: Not present 
 *   - DEU: Not present
 *   - ESP: D.C.
 *   - FRA: Clé 
 *   - GBR: Not present 
 *   - ITA: CIN 
 *   - NLD: Not present 
 *   - USA: Not present
 */
@property(retain) NSString* accountKey;

/**
 * @property name
 * @brief User specified nickname for account
 */
@property(retain) NSString* name;

/**
 * @property accountType
 * @brief Type of account
 *
 * Valid values include: 
 * - CHECKING:   Checking 
 * - SAVINGS:    Savings 
 * - MONEYMRKT:  Money Market 
 * - CREDITLINE: Line of credit
 */
@property(retain) NSString* accountType;

/**
 * @property currency
 * @brief Default currency used for this account.
 */
@property(retain) OFXCurrency* currency;

/**
 * @property supportsTransactionDownload
 * @brief Y if account supports transaction detail downloads, N if it is balance-only
 */
@property(assign) bool supportsTransactionDownload;

/**
 * @property serviceStatus
 * @brief Status of the account 
 * 
 * - AVAIL = Available, but not yet requested 
 * - PEND = Requested, but not yet available 
 * - ACTIVE = In use
 */
@property(retain) NSString* serviceStatus;

@end
